from django.conf.urls.defaults import *
from django.contrib import admin
from genuis import settings
from genuis import views
admin.autodiscover()

urlpatterns = patterns('',
     #('^$', views.index, name="index"),
     ('^$', views.index),
     ('^(?P<username>\w+)/$', views.main),
     (r'^thoughts/', include('thoughts.urls')),
     (r'^books/', include('books.urls')),
     (r'^articles/', include('articles.urls')),
     (r'^search/', include('search.urls')),
     (r'^admin/', include(admin.site.urls)),
     (r'^accounts/', include('registration.urls')),
     (r'^groups/', include('groups.urls')),
     (r'^authors/', include('authors.urls')),
     (r'^media/(?P<path>.*)$', 'django.views.static.serve', 
       {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
     (r'^static/(?P<path>.*)$', 'django.views.static.serve',
       {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),

)
